Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Function |abs

std/ops/num::|abs


Usage

|abs<N>(value)

Generics

◻ N: Signed

Parameters

↳ value: N

Return

Option<N>


Return absolute value.

If the absolute value cannot fit into the type itself (such as i8 -128 that cannot be turned into 128), none value is returned.